package com.yitiao.data_algorithms.leetcode.editor.cn;

import java.util.ArrayList;
import java.util.List;

class FindKClosestElements {
    // 2023-04-03 18:09:25
    public static void main(String[] args) {
        Solution solution = new FindKClosestElements().new Solution();
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        // 二分查找
        public List<Integer> findClosestElements(int[] arr, int k, int x) {
            int n = arr.length, l = 0, r = n - 1;
            while (l < r) {
                int mid = l + r + 1 >> 1;
                if (arr[mid] <= x) l = mid;
                else r = mid - 1;
            }

            // 双指针
            return new ArrayList<>();
            
        }
    }
//leetcode submit region end(Prohibit modification and deletion)

}